<?php
	define('ROOT_PATH',dirname(__FILE__));
	include_once ROOT_PATH.'/../lib/Rcode/qrcode_img.class.php';

	class myQrcode{
		function newQrcode($data,$filename='',$size='480'){
			$z = new Qrcode_image;
			
			$f = '#000000';		//二维码颜色
			$b = '#ffffff';		//背景颜色
			$pt = '#000000';	//方块颜色
			$inpt = '#000000';		//方块内颜色
			
			//样式状态 液态 直角 圆圈
			$s = 1;
			//纠错等级
			$level = "L";
			
			$z->set_qrcode_error_correct($level);   # set ecc level H
			$z->qrcode_image_out($data,$filename,$size,'','',$pt,$inpt,$f,$b,'#ff0000',$s);
		}
	}
?>